<%@ include file="/WEB-INF/common/global.jsp" %>
<jsp:include page="/WEB-INF/common/header.jsp" />

<center>
	<div class="content-area registration">
		<v:form action="/registration" method="post">
			<h1>JSP validation framework test</h1>						
			<div class="login-content-div">
				<table>
					<tr>
						<td>Firstname:</td>
						<td>
							<v:inputText name="fname" styleClass="rounded-input long-input">
								<v:validator type="text" required="true" minlength="4" maxlength="10" />
							</v:inputText>
						</td>
					</tr>
					<tr>
						<td>Lastname:</td>
						<td>
							<v:inputText name="lname" styleClass="rounded-input long-input">
								<v:validator type="text" required="true" minlength="4" maxlength="10" />
							</v:inputText>
						</td>
					</tr>
					<tr>
						<td>Age:</td>
						<td>
							<v:inputText name="age" styleClass="rounded-input long-input">
								<v:validator type="number" numberformat="int" minvalue="18" maxvalue="60" />
							</v:inputText>
						</td>
					</tr>
					<tr>
						<td>Birthday:</td>
						<td>
							<v:inputText name="birthday" styleClass="rounded-input long-input">
								<v:validator type="date" />
							</v:inputText>
						</td>
					</tr>
					<tr>
						<td>E-mail:</td>
						<td>
							<v:inputText name="email" styleClass="rounded-input long-input">
								<v:validator type="email" required="true"/>
							</v:inputText>
						</td>
					</tr>
					<tr>
						<td>Homepage:</td>
						<td>
							<v:inputText name="homepage" styleClass="rounded-input long-input">
								<v:validator type="url" />
							</v:inputText>
						</td>
					</tr>
					<tr>
						<td>Gender:</td>
						<td>
							<select name="gender" class="rounded-select long-input">
								<option value="0" selected="selected">Male</option>
								<option value="1">Female</option>
							</select>
						</td>
					</tr>
					<tr>
						<td>Username:</td>
						<td>
							<v:inputText name="username" styleClass="rounded-input long-input">
								<v:validator type="word" required="true" minlength="6" maxlength="12" />
							</v:inputText>						
						</td>
					</tr>
					<tr>
						<td>Password:</td>
						<td><input name="password" type="password" class="rounded-input long-input" /></td>
					</tr>
					<tr>
						<td>Confirm password:</td>
						<td><input name="confirmpassword" type="password" class="rounded-input long-input" /></td>
					</tr>
				</table>
				<div class="login-button-div">
					<input type="submit" class="small-button-grey" value="Save" />
					<span>&nbsp;&nbsp;</span>
					<input type="reset" class="small-button-grey" value="Cancel" />
				</div>
			</div>							
		</v:form>
	</div>			
</center>

<jsp:include page="/WEB-INF/common/footer.jsp" />